<?php

class PageFooter {
	
	/**
	 * Returns date format in HTML.
	 * @return String HTML
	 */
	public function getHTML() {
		return $this->getCurrentDay() . 
				", den " . date("d") . " " . 
				$this->getCurrentMonth() . 
				" år " . date("Y") . 
				". Klockan är [" . date("G:i:s") . "].";
	}
	
	/**
	 * @param 	String	$currentMonth
	 * @return 	String 	month
	 */
	private function getCurrentMonth() {	
		$currentMonth = date("n");
		
		switch ($currentMonth) {
			case 1:
				$currentMonth = "Januari";
				break;
			case 2:
				$currentMonth = "Februari";
				break;
			case 3:
				$currentMonth = "Mars";
				break;
			case 4:
				$currentMonth = "April";
				break;
			case 5:
				$currentMonth = "Maj";
				break;
			case 6:
				$currentMonth = "Juni";
				break;
			case 7:
				$currentMonth = "Juli";
				break;
			case 8:
				$currentMonth = "Augusti";
				break;
			case 9:
				$currentMonth = "September";
				break;
			case 10:
				$currentMonth = "Oktober";
				break;
			case 11:
				$currentMonth = "November";
				break;
			case 12:
				$currentMonth = "December";
				break;
			default:
				$currentMonth = "-";
		}
		return $currentMonth;
	}
	
	/**
	 * @param 	String	$currentDayOfWeek
	 * @return 	String 	day
	 */
	private function getCurrentDay() {
		$currentDayOfWeek = date("N"); 
		
		switch ($currentDayOfWeek) {
			case 1:
				$currentDayOfWeek = "Måndag";
				break;
			case 2:
				$currentDayOfWeek = "Tisdag";
				break;
			case 3:
				$currentDayOfWeek = "Onsdag";
				break;
			case 4:
				$currentDayOfWeek = "Torsdag";
				break;
			case 5:
				$currentDayOfWeek = "Fredag";
				break;
			case 6:
				$currentDayOfWeek = "Lördag";
				break;
			case 7:
				$currentDayOfWeek = "Söndag";
				break;
			default:
				$currentDayOfWeek = "-";
		}
		return $currentDayOfWeek;
	}
}
